<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>js函数</title>
		<script>
			var n=window.prompt("请输入一个数字:","0");
			var i=parseInt(n);
			if(isNaN(n)){
				alert("转换不成功")
			}else{
				alert(i);//i+10
			}
			// if(isNaN(i)){
			// 	alert("转换不成功")
			// }else{
			// 	alert(i);//i+10
			// }
			
		</script>
	</head>
	<body>
	</body>
</html>
